﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data.Common;

namespace Runda.EShop.Dal
{
    public partial class SysUserDal
    {
        public void UpdatePassword(Guid UserID, string Password)
        {
            string sql = "update Sys_User set Password=@Password where UserID = @UserID";

            DbCommand dbcommand = CurrentDatabase.GetSqlStringCommand(sql);
            CurrentDatabase.AddInParameter(dbcommand, "@Password", System.Data.DbType.String, Password);
            CurrentDatabase.AddInParameter(dbcommand, "@UserID", System.Data.DbType.Guid, UserID);

            CurrentDatabase.ExecuteNonQuery(dbcommand);
        }
    }
}
